using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text;
using System.Data; 
using yq.IBase; 
using yq.Dictionary; 
using yq.Basis; 
using yq.Model.Logic;
using System.Collections; 
using Db; 
using System.Data.Common;

namespace yq.Model.Base 
{
    ///<summary>
    /// Article_Job - 招聘 - 对象基础类
    /// </summary>
    ///<typeparam name="T"></typeparam>
    public abstract class IArticleJob<T> :ModelBase<ArticleJob> where T : ArticleJob, new()
    {
        /// <summary>
        /// 写入主键值
        /// </summary>
        /// <param name="Id">主键</param>
        protected internal override void SetKeyValue(dynamic Id)
        {
            this.JodId = Id;
        }

        /// <summary>
        /// 获取主键值
        /// </summary>
        /// <returns></returns>
        protected internal override dynamic GetKeyValue()
        {
            return JodId;
        }

        /// <summary>
        /// 为本对象赋值
        /// </summary>
        /// <param name="dy"></param>
        public override void SetValue(dynamic dy) 
        {
           this.JodId=dy.JodId;
           this.RecruitingNumbers=dy.RecruitingNumbers;
           this.Position=dy.Position;
           this.Salary=dy.Salary;
           this.Place=dy.Place;
           this.Duty=dy.Duty;
           this.Require=dy.Require;
           this.Phone=dy.Phone;
           this.ContentId=dy.ContentId;
        } 

        #region 定义属性

     
         /// <summary>
        /// jodId
        /// </summary>
        private String _JodId = "";
      
        /// <summary>
        /// jodId
        /// </summary>
        public String JodId
        {
            get 
            {
              return   (this._JodId); 
            }

            set 
            {
                    _JodId= value;  
            }
        }
       
     
         /// <summary>
        /// 招聘人数
        /// </summary>
        private int _RecruitingNumbers =int.MinValue;
      
        /// <summary>
        /// 招聘人数
        /// </summary>
        public int RecruitingNumbers
        {
            get 
            {
              return   (this._RecruitingNumbers); 
            }

            set 
            {
                    _RecruitingNumbers= value;  
            }
        }
       
     
         /// <summary>
        /// 职位
        /// </summary>
        private String _Position = "";
      
        /// <summary>
        /// 职位
        /// </summary>
        public String Position
        {
            get 
            {
              return   (this._Position); 
            }

            set 
            {
                    _Position= value;  
            }
        }
       
     
         /// <summary>
        /// 工资
        /// </summary>
        private String _Salary = "";
      
        /// <summary>
        /// 工资
        /// </summary>
        public String Salary
        {
            get 
            {
              return   (this._Salary); 
            }

            set 
            {
                    _Salary= value;  
            }
        }
       
     
         /// <summary>
        /// 工作地点
        /// </summary>
        private String _Place = "";
      
        /// <summary>
        /// 工作地点
        /// </summary>
        public String Place
        {
            get 
            {
              return   (this._Place); 
            }

            set 
            {
                    _Place= value;  
            }
        }
       
     
         /// <summary>
        /// 职责
        /// </summary>
        private String _Duty = "";
      
        /// <summary>
        /// 职责
        /// </summary>
        public String Duty
        {
            get 
            {
              return   (this._Duty); 
            }

            set 
            {
                    _Duty= value;  
            }
        }
       
     
         /// <summary>
        /// 要求
        /// </summary>
        private String _Require = "";
      
        /// <summary>
        /// 要求
        /// </summary>
        public String Require
        {
            get 
            {
              return   (this._Require); 
            }

            set 
            {
                    _Require= value;  
            }
        }
       
     
         /// <summary>
        /// 联系电话
        /// </summary>
        private String _Phone = "";
      
        /// <summary>
        /// 联系电话
        /// </summary>
        public String Phone
        {
            get 
            {
              return   (this._Phone); 
            }

            set 
            {
                    _Phone= value;  
            }
        }
       
     
         /// <summary>
        /// 内容ID
        /// </summary>
        private String _ContentId = "";
      
        /// <summary>
        /// 内容ID
        /// </summary>
        public String ContentId
        {
            get 
            {
              return   (this._ContentId); 
            }

            set 
            {
                    _ContentId= value;  
            }
        }
       

      #endregion 定义属性 

          protected internal override void SetValue(ArticleJob info, DataRow row) 
          { 
               if (row == null) 
               { 
                 info.IsLoad = false; 
               }
               else 
               { 
                  info.IsLoad = true; 
                  
                  if(row["JodId"]!= DBNull.Value)
                  {
                  info.JodId=row["JodId"].ToString();
                 }
                 
                  
                  if(row["RecruitingNumbers"]!= DBNull.Value)
                  {
                  info.RecruitingNumbers=Convert.ToInt32(row["RecruitingNumbers"]);
                 }
                 
                  
                  if(row["Position"]!= DBNull.Value)
                  {
                  info.Position=row["Position"].ToString();
                 }
                 
                  
                  if(row["Salary"]!= DBNull.Value)
                  {
                  info.Salary=row["Salary"].ToString();
                 }
                 
                  
                  if(row["Place"]!= DBNull.Value)
                  {
                  info.Place=row["Place"].ToString();
                 }
                 
                  
                  if(row["Duty"]!= DBNull.Value)
                  {
                  info.Duty=row["Duty"].ToString();
                 }
                 
                  
                  if(row["Require"]!= DBNull.Value)
                  {
                  info.Require=row["Require"].ToString();
                 }
                 
                  
                  if(row["Phone"]!= DBNull.Value)
                  {
                  info.Phone=row["Phone"].ToString();
                 }
                 
                  
                  if(row["ContentId"]!= DBNull.Value)
                  {
                  info.ContentId=row["ContentId"].ToString();
                 }
                 
               } 

          } 

        protected internal override void GetDbParameters(DbCommand comm, ArticleJob info, DbHelper cn) 
        { 
             
                cn.AddInParameter(comm, "@JodId", DbType.String,ParameterTool.GetObj( info._JodId )); 
            
             
                cn.AddInParameter(comm, "@RecruitingNumbers", DbType.Int32,ParameterTool.GetObj( info._RecruitingNumbers )); 
            
             
                cn.AddInParameter(comm, "@Position", DbType.String,ParameterTool.GetObj( info._Position )); 
            
             
                cn.AddInParameter(comm, "@Salary", DbType.String,ParameterTool.GetObj( info._Salary )); 
            
             
                cn.AddInParameter(comm, "@Place", DbType.String,ParameterTool.GetObj( info._Place )); 
            
             
                cn.AddInParameter(comm, "@Duty", DbType.String,ParameterTool.GetObj( info._Duty )); 
            
             
                cn.AddInParameter(comm, "@Require", DbType.String,ParameterTool.GetObj( info._Require )); 
            
             
                cn.AddInParameter(comm, "@Phone", DbType.String,ParameterTool.GetObj( info._Phone )); 
            
             
                cn.AddInParameter(comm, "@ContentId", DbType.String,ParameterTool.GetObj( info._ContentId )); 
            
        } 

    } 
} 